<template>
	<footer class="detail-footer">
		<router-link tag="div" to="/" class="iconfont icon-contact detail-footer-icon"></router-link>
		<router-link tag="div" to="/cart" class="iconfont icon-cart detail-footer-icon">
			<message-logo :message="allCount" top="6px" right="6px"/>
		</router-link>
		<div class="iconfont icon-star detail-footer-icon"></div>
		<div class="detail-footer-btn">
			<button @click="btnClick(2)">立即购买</button>
		</div>
		<div class="detail-footer-btn red">
			<button @click="btnClick(1)">加入购物车</button>
		</div>
	</footer>
</template>

<script>
	import messageLogo from '#/Public/messageLogo';

	export default {
		name: "Footer",
		props: {
			allCount: {
				type: Number,
				required: true
			}
		},
		methods: {
			btnClick(type) {
				this.$emit('click', Number(type));
			}
		},
		components: {
			messageLogo
		}
	}
</script>
